package com.tuling.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * {@link SpringBootApplication }   标记启动类，整个工程只需要一个
 *
 * {@link SpringBootApplication } SpringBoot的启动类（入口）
 * {@link Configuration } spring.xml 也是配置类
 * {@link ComponentScan } = <context:component-scan basePackages="cn.tulingxueyuan"></context:component-scan>
 * <p>
 * Spring底层在解析配置类， 回去解析@ComponentScan,读取basePackages，
 * 如果没有读取到，会将当前配置类所在的包当做扫描包
 * <p>
 * 位置： 最好放在需要扫描包的根目录、或者说放在所有Bean的顶层目录中
 */
@SpringBootApplication
public class TulingDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(TulingDemoApplication.class, args);
    }

}
